import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/tykj";

// 查询供应商列表
export function listSupplier(query) {
  return request({
    url: '/basic/supplier/list',
    method: 'get',
    params: query
  })
}

// 新增供应商列表
export function addSupplier(data) {
  return request({
    url: '/basic/supplier/save',
    method: 'post',
    data: data
  })
}

// 查询供应商详细
export function getSupplier(id) {
  return request({
    url: '/basic/supplier/info/' + praseStrEmpty(id),
    method: 'get'
  })
}

// 修改供应商
export function updateSupplier(data) {
  return request({
    url: '/basic/supplier/update',
    method: 'put',
    data: data
  })
}

// 删除用户
export function delSupplier(userId) {
  return request({
    url: '/basic/supplier/delete/' + userId,
    method: 'delete'
  })
}






